package com.hzw.dao;

import com.hzw.bean.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@Repository
public interface UserMapper extends Mapper<User> {
    int checkExistUserName(String userName);

    int checkPassword(User user);

    User getUserByNameAndPass(User user);

    String getUserIdByArticleId(String articleId);

    int addActivityLevel(@Param("userId") String userId, @Param("count") int count);

    int updatePassword(User user);

    User selectUserById(String userId);

    List<User> selectUserByKeyWord(@Param("keyWord") String keyWord);

    int updateFocusNum(@Param("userId") String userId,@Param("count") int count);

    int updateFollowNum(@Param("userId") String userId,@Param("count") int count);

    int updateArticleNum(@Param("userId") String userId,@Param("count") int count);

    List<User> selectFocusUserById(String userId);

    List<User> selectFollowUserById(String userId);

    String selectUserNameById(String userId);


}